package cn.zhang.reimbursement_1.controller;


import cn.zhang.reimbursement_1.service.RecordService;
import cn.zhang.reimbursement_1.tools.JsonData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/record")
@Api(tags = "日志模块")
public class RecordController {
    @Autowired
    private RecordService recordService;


    @ApiOperation("分页查询日志")
    @GetMapping("/page_get_record")
    public JsonData pageGetRecord(@RequestParam(value = "pageSize",defaultValue = "10",required = false) int pageSize
            ,@RequestParam(value = "pageNum",defaultValue = "1",required = false) int pageNum
            ,@RequestParam(value = "like",defaultValue = "",required = false)String like){
        JsonData jsonData = recordService.pageGetRecord(pageNum,pageSize,like);
        return jsonData;

    }
}
